<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: qupen
  Date: 2016/10/12
  Time: 9:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="../../include/head.jsp">
    <jsp:param name="title" value="user_list"/>
</jsp:include>

<jsp:include page="../../include/tenant_header.jsp"/>

<jsp:include page="../../include/tenant_sidebar.jsp"/>
<div class="content-wrapper">
    <section class="content-header">
        <h4 class="page-title" style="display: inline-block"><spring:message code="label.details"/></h4>

    </section>
    <section class="content">
        <div class="box box-primary">
            <div class="box-body">
                <div class="form-horizontal">
                    <div class="sie-padding-top">
                        <div class="form-group">
                            <label class="col-md-6 sie-left-name" style="margin-top: 0"><spring:message code="label.tenant.children.name"/>
                                ： </label>${userInfo.getUserName()}
                        </div>
                        <c:if test="${userInfo.getTelephone()!=null&&userInfo.getTelephone()!=''}">
                            <div class="form-group">
                                <label class="col-md-6 sie-left-name" style="margin-top: 0"><spring:message code="label.tenant.children.phone"/>
                                    ： </label>${userInfo.getTelephone()}
                            </div>
                        </c:if>
                        <div class="form-group">
                            <label class="col-md-6 sie-left-name" style="margin-top: 0"><spring:message code="label.tenant.create.mail"/>
                                ： </label>${userInfo.getEmail()}
                        </div>
                        <c:if test="${userInfo.getDepartment()!=null&&userInfo.getDepartment()!=''}">
                            <div class="form-group">
                                <label class="col-md-6 sie-left-name" style="margin-top: 0"><spring:message code="label.user.department"/>
                                    ： </label>${userInfo.getDepartment()}
                            </div>
                        </c:if>
                        <c:if test="${userInfo.getJob()!=null&&userInfo.getJob()!=''}">
                            <div class="form-group">
                                <label class="col-md-6 sie-left-name" style="margin-top: 0"><spring:message code="label.tenant.duty"/>
                                    ： </label>${userInfo.getJob()}
                            </div>
                        </c:if>
                        <c:if test="${userInfo.getGroup()!=null&&userInfo.getGroup()!=''}">
                            <div class="form-group">
                                <label class="col-md-6 sie-left-name" style="margin-top: 0"><spring:message code="label.tenant.user.group"/>
                                    ： </label>${userInfo.getGroup()}
                            </div>
                        </c:if>
                        <c:if test="${userInfo.getLogoMd5()!=null&&userInfo.getLogoMd5()!=''}">
                            <div class="form-group">
                                <label class="col-md-6 sie-left-name" style="margin-top: 0"><spring:message code="label.user.avatar"/> ：</label>
                                <a class="sie-u-avatar" href="/api/v1/image/get?name=${userInfo.getLogoMd5()}"
                                   target="_blank">
                                    <img src="/api/v1/image/get?name=${userInfo.getLogoMd5()}"
                                         data-name="${userInfo.getLogoMd5()}">
                                </a>
                            </div>
                        </c:if>
                        <div class="form-group">
                            <div class="col-md-offset-5">
                                <a id="edit" class="solid-button-green" href="javascript:;" style="margin-right: 20px"><spring:message code="label.user.edit"/></a>
                                <a id="back" class="solid-button-green" href="javascript:;" style="background-color:#ffb900;border: 1px solid #ffb900"><spring:message code="label.tenant.return"/></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
<jsp:include page="../../include/foot.jsp"/>
<script>
    $(document).ready(function () {
        var key = getKeyByUrl();
        $("#edit").click(function () {
            window.location.replace("/partner/" + key + "/user/set?userId=" + "${userInfo.getUserId()}"+"#userManageer");
        });

        $("#back").click(function(){
            window.location.replace("/partner/"+key+"/user/list#userManageer");
        })
    })
</script>